package sac.modelo.data.maestros;

/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: 
 * License Type: Evaluation
 */
import java.io.Serializable;
import javax.persistence.*;

import sac.modelo.data.transacciones.ControlSanitario;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="Enfermedad")
public class Enfermedad implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Enfermedad() {
	}
	
	@Column(name="id_enfermedad", nullable=false)	
	@Id		
	private int id_enfermedad;
	
	@Column(name="descripcion", nullable=true, length=60)	
	private String descripcion;
	
	@OneToMany(mappedBy="enfermedadid_enfermedad", targetEntity=ControlSanitario.class)	
	@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})	
	@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)	
	private java.util.Set<ControlSanitario> controlSanitario = new java.util.HashSet<ControlSanitario>();
	
	private void setId_enfermedad(int value) {
		this.id_enfermedad = value;
	}
	
	public int getId_enfermedad() {
		return id_enfermedad;
	}
	
	public int getORMID() {
		return getId_enfermedad();
	}
	
	public void setDescripcion(String value) {
		this.descripcion = value;
	}
	
	public String getDescripcion() {
		return descripcion;
	}
	
	public void setControl_Sanitario(java.util.Set<ControlSanitario> value) {
		this.controlSanitario = value;
	}
	
	public java.util.Set<ControlSanitario> getControl_Sanitario() {
		return controlSanitario;
	}
	
	
	public String toString() {
		return String.valueOf(getId_enfermedad());
	}
	
}
